/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.opensudoku.root.concrete;

import java.util.Vector;

import org.opensudoku.root.exceptions.SetLengthExceededException;
import org.opensudoku.root.fon.FonResults;
import org.opensudoku.root.vsb.VirtualSudokuBoard;

/**
 *
 * @author sony
 */
public class ConcreteResults {
    private Vector<?> SolutionVector;
    private int noOfSolutions;
    private FonResults FR;
    public ConcreteResults()
    {
        this.FR=null;
        this.SolutionVector=null;
        this.noOfSolutions=0;
    }
    public ConcreteResults(Vector<?> v,FonResults fr)
    {
        this.FR=fr;
        this.SolutionVector=v;
        this.noOfSolutions=v.size();
    }

    public int getNoOfSolutions()
    {
        return this.noOfSolutions;
    }

    public VirtualSudokuBoard ReturnSolutionAt(int index) throws SetLengthExceededException
    {
        if(index<1||index>this.noOfSolutions)
            throw new SetLengthExceededException(index);
        return (VirtualSudokuBoard) this.SolutionVector.get(index-1);
    }

    public FonResults ReturnFonReference()
    {
        return this.FR;
    }
}
